-- GENERATED SPELL FOR [Spiked Ghoul] --


function spell0_30597(pUnit, Event) --@Claw Slash,n/a--
pUnit:FullCastSpellOnTarget(54185,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30597', 581, 1)
end

function spell1_30597(pUnit, Event) --@Jagged Spike,n/a--
pUnit:FullCastSpellOnTarget(60876,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30597', 500, 1)
end

function Sorts_30597(pUnit, Event)
local choix_sorts_30597 = math.random(0, 1)
if choix_sorts_30597 == 0 then
pUnit:RegisterEvent('spell0_30597', 1, 1)
end
if choix_sorts_30597 == 1 then
pUnit:RegisterEvent('spell1_30597', 1, 1)
end
end

function mob30597_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30597', math.random(1500, 3000), 1)
end

function mob30597_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30597_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30597_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30597, 1, 'mob30597_Action')
RegisterUnitEvent(30597, 2, 'mob30597_Leave')
RegisterUnitEvent(30597, 3, 'mob30597_Kill')
RegisterUnitEvent(30597, 4, 'mob30597_Die')
